#ifndef __IO_H__
#define __IO_H__


//IMCR
#define IMCRCONTROLPORT 0x22
#define IMCRDATAPORT 0x23



// 8295A
#define PICMASTERCONTROLPORT 0x20
#define PICMASTERDATAPORT 0x21
#define PICCLUSCONTROLPORT 0xA0
#define PICCLUSDATAPORT 0xA1


// keyboard
#define PORT_KB_DATA 0x60
#define PORT_KB_STATUS 0x64
#define PORT_KB_CMD 0x64




// PCI
#define PORT_PCI_CONTROL 0xcf8
#define PORT_PCI_DATA 0xcfc



// disk
//ATA0
#define	PORT_DISK0_DATA			0x1f0
#define	PORT_DISK0_ERR_FEATURE	0x1f1
#define	PORT_DISK0_SECTOR_CNT	0x1f2
#define	PORT_DISK0_SECTOR_LOW	0x1f3
#define	PORT_DISK0_SECTOR_MID	0x1f4
#define	PORT_DISK0_SECTOR_HIGH	0x1f5
#define	PORT_DISK0_DEVICE		0x1f6
#define	PORT_DISK0_STATUS_CMD	0x1f7

#define	PORT_DISK0_ALT_STA_CTL	0x3f6

//ATA1
#define	PORT_DISK1_DATA			0x170
#define	PORT_DISK1_ERR_FEATURE	0x171
#define	PORT_DISK1_SECTOR_CNT	0x172
#define	PORT_DISK1_SECTOR_LOW	0x173
#define	PORT_DISK1_SECTOR_MID	0x174
#define	PORT_DISK1_SECTOR_HIGH	0x175
#define	PORT_DISK1_DEVICE		0x176 //配置寄存器
#define	PORT_DISK1_STATUS_CMD	0x177 //控制器状态端口 控制器命令端口  

#define	PORT_DISK1_ALT_STA_CTL	0x376  //磁盘控制端口


// CMOS  RTC
#define PORT_RTC_INDEX 0x70
#define PORT_RTC_DATA 0x71



//

#endif